﻿using System;
using System.Collections.Generic;

namespace Holdem.Interfaces.Configuration
{
	public interface IHoldemConfiguration<TKey, TValue> : IDictionary<TKey, TValue>
	{
		TValue Get(TKey key, TValue defaultValue);

		/// <summary>
		/// 
		/// Get an item of the specified type TValue.
		/// 
		/// </summary>
		/// <typeparam name="TValue"></typeparam>
		/// <param name="key"></param>
		/// <returns></returns>
		TValue Get(TKey key);

		/// <summary>
		/// 
		/// Get an item of the specified type T.
		/// 
		/// </summary>
		/// <typeparam name="T"></typeparam>
		/// <param name="key"></param>
		/// <returns></returns>
		T Get<T>(TKey key) where T : IConvertible;

		void Set(TKey key, TValue value);

		T Cast<T>(TKey key) where T : IConvertible;

		void Load();

		void Save();
	}

	public interface IHoldemPhoneConfiguration : IHoldemConfiguration<ConfigKey, object>
	{

	}

	public enum ConfigKey
	{
        Invalid = 0,

		HandHistorySaveDirectory,

		//Calculator View
		HoldemCalcViewNumberOfOuts,
		HoldemCalcViewPotSize,
		HoldemCalcViewBetAmount,
		HoldemCalcViewHandRank,

		//StatsView
		HoldemStatsViewNumberOfPlayers,
		HoldemStatsViewNumberOfOuts,
		HoldemStatsViewSelectedKicker,
        HoldemStatsSelectedPocketPair,
        HoldemSelectedPanoramoItem,

		//StartingHandsView
		HoldemHandsViewSelectedStartingHand,
        HoldemStartingHandsSelectionEventRegistration,

		//OptionsView
        HoldemOptionsViewNumberOfPlayers,
        HoldemOptoinsViewCardAnimations,
		HoldemOptionsViewSkipScale,
		HoldemOptionsViewPrecision,
		HoldemOptionsViewUserName,
		HoldemOptionsViewRecursiveSearch,
		HoldemOptionsViewPreview,
		HoldemOptionsViewWriteHandHistory,
		HoldemOptionsViewSelectedReplayEngine,
		HoldemOptionsViewSelectedSearchFilter,
        HoldemOptionsViewHandHistorySaved,

        //Holdem Application Information
        HoldemLicenseInformationTrial,

        //Sensor
        AccelerometerCalibrationX,
        AccelerometerCalibrationY
	}
}